package org.dromara.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.system.domain.SysUserWithdrawalPolicy;
import org.dromara.system.domain.bo.InitWithdrawalPolicyBo;
import org.dromara.system.domain.bo.SysUserWithdrawalPolicyBo;
import org.dromara.system.domain.vo.SysUserWithdrawalPolicyVo;

import java.util.Collection;
import java.util.List;

/**
 * 提现政策Service接口
 *
 * @author Lion Li
 * @date 2025-07-16
 */
public interface ISysUserWithdrawalPolicyService extends IService<SysUserWithdrawalPolicy> {

    /**
     * 查询提现政策
     *
     * @param id 主键
     * @return 提现政策
     */
    SysUserWithdrawalPolicyVo queryById(Long id);

    /**
     * 分页查询提现政策列表
     *
     * @param bo        查询条件
     * @param pageQuery 分页参数
     * @return 提现政策分页列表
     */
    TableDataInfo<SysUserWithdrawalPolicyVo> queryPageList(SysUserWithdrawalPolicyBo bo, PageQuery pageQuery);

    /**
     * 查询符合条件的提现政策列表
     *
     * @param bo 查询条件
     * @return 提现政策列表
     */
    List<SysUserWithdrawalPolicyVo> queryList(SysUserWithdrawalPolicyBo bo);

    /**
     * 新增提现政策
     *
     * @param bo 提现政策
     * @return 是否新增成功
     */
    Boolean insertByBo(SysUserWithdrawalPolicyBo bo);

    /**
     * 修改提现政策
     *
     * @param bo 提现政策
     * @return 是否修改成功
     */
    Boolean updateByBo(SysUserWithdrawalPolicyBo bo);

    /**
     * 校验并批量删除提现政策信息
     *
     * @param ids     待删除的主键集合
     * @param isValid 是否进行有效性校验
     * @return 是否删除成功
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    void initWithdrawalPolicy(InitWithdrawalPolicyBo bo);

    SysUserWithdrawalPolicyVo queryUserWithdrawalPolicy(SysUserWithdrawalPolicyBo bo);
}
